# $Id: PKGBUILD 65513 2012-02-21 07:36:49Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# contributor: Jacek Poplawski <jacekpoplawski@gmail.com>

pkgname=rocksndiamonds-data
pkgver=3.3.0.1
pkgrel=2
arch=(any)
pkgdesc='rockndiamonds game data and levels'
url="http://www.artsoft.org/rocksndiamonds/"
license=('GPL')
depends=()
makedepends=('unzip' 'p7zip')
options=('!strip')
source=(http://www.artsoft.org/RELEASES/unix/rocksndiamonds/rocksndiamonds-3.3.0.0.tar.gz
	http://www.artsoft.org/RELEASES/rocksndiamonds/levels/Contributions-1.2.0.zip
	http://www.artsoft.org/RELEASES/rocksndiamonds/levels/Sokoban-1.0.0.zip
	http://www.artsoft.org/RELEASES/rocksndiamonds/levels/Boulder_Dash_Dream-1.0.0.zip
	http://www.artsoft.org/RELEASES/rocksndiamonds/levels/BD2K3-1.0.0.zip
	http://www.artsoft.org/RELEASES/rocksndiamonds/levels/Snake_Bite-1.0.0.zip
	http://www.artsoft.org/RELEASES/rocksndiamonds/levels/Zelda-1.0.0.zip
	http://www.artsoft.org/RELEASES/rocksndiamonds/levels/ZeldaII-1.0.0.zip
	http://www.jb-line.de/hp/rnd_jue-v8.zip
	http://www.artsoft.org/RELEASES/rocksndiamonds/levels/Emerald_Mine_Club-2.0.0.7z
	http://artsoft.org/RELEASES/unix/rocksndiamonds/levels/rockslevels-sp-1.0.tar.gz
	http://artsoft.org/RELEASES/unix/rocksndiamonds/levels/rockslevels-dx-1.0.tar.gz
	http://artsoft.org/RELEASES/unix/rocksndiamonds/levels/rockslevels-emc-1.0.tar.gz)
md5sums=('191b7a63de9706b0aee52cdf983b3267'
         '573f4e04ad4e1490804bc0154133c1c8'
         '3af33cfa0277e9358696c7bf22096d1a'
         'a7d78a41eb13932efce568cedc9b3388'
         'ebc8e019fa9a799757d90828e242c206'
         '52ef211765c995ea40ecb646345fdc2b'
         '8e9d7c8e9d7595ac987d879774c488cd'
         'd8e6449f6ad5e29a07354e0e15290481'
         '330c6eb97cf19f4dbed6e6f21a783c06'
         '4276673a791c66747a438a3a94d20121'
         '3af9a97e59f29995f3f7fc4da0595af6'
         'fbc250f7995c666c1c745dbaf591ce32'
         '9c6cbf7394e465a90af66236dc1db6f5')

build() {
  cd $srcdir/rocksndiamonds-3.3.0.0
  install -d $pkgdir/usr/share/rocksndiamonds
  cp -R graphics $pkgdir/usr/share/rocksndiamonds
  cp -R levels $pkgdir/usr/share/rocksndiamonds
  cp -R sounds $pkgdir/usr/share/rocksndiamonds
  cp -R music $pkgdir/usr/share/rocksndiamonds

  # install levels
  cd $srcdir
  cp -R levels/* $pkgdir/usr/share/rocksndiamonds/levels/
  cp -R Sokoban $pkgdir/usr/share/rocksndiamonds/levels
  cp -R Contributions $pkgdir/usr/share/rocksndiamonds/levels
  cp -R rnd_jue $pkgdir/usr/share/rocksndiamonds/levels
  cp -R BD2K3 $pkgdir/usr/share/rocksndiamonds/levels
  cp -R Boulder_Dash_Dream $pkgdir/usr/share/rocksndiamonds/levels
  cp -R Emerald_Mine_Club $pkgdir/usr/share/rocksndiamonds/levels
  cp -R Snake_Bite $pkgdir/usr/share/rocksndiamonds/levels
  cp -R zelda $pkgdir/usr/share/rocksndiamonds/levels
  cp -R zelda2 $pkgdir/usr/share/rocksndiamonds/levels

  chown -R root:root $pkgdir/usr/share/rocksndiamonds
  find $pkgdir/usr/share/rocksndiamonds -type d -exec chmod 0755 {} \;
  find $pkgdir/usr/share/rocksndiamonds -type f -exec chmod 0644 {} \;
}
